import { defineComponent } from 'vue'
import { useUserStore } from '@/stores/user'
import { useRouter } from 'vue-router'

export default defineComponent({
  name: 'aiAgent',
  setup() {
    const { logout } = useUserStore()
    const router = useRouter()

    const toDetail = () => {
      router.push({
        name: 'agentDetail',
        params: {
          id: '1955109346522419200',
        },
      })
    }

    return () => (
      <>
        <div>我是ai智能体</div>
        <a-button type="primary" onClick={logout}>
          登出
        </a-button>
        <a-button type="primary" onClick={toDetail}>
          去详情
        </a-button>
      </>
    )
  },
})
